package com.lindroy.androidplayer.viewmodels

import androidx.lifecycle.ViewModel
import com.lindroy.androidplayer.utils.SingleLiveEvent
import com.lindroy.androidplayer.utils.mapSingle

/**
 * @author Lin
 * @date 2022/3/3
 * @function
 */
class AboutUsViewModel : ViewModel() {
    private val libraryClickAction = SingleLiveEvent<Unit>()

    private val websiteClickAction = SingleLiveEvent<Unit>()

    val libraryLiveData = libraryClickAction.mapSingle {  }

    val websiteLiveData = websiteClickAction.mapSingle {  }

    fun onLibraryClick(){
        libraryClickAction.postValue(Unit)
    }

    fun onWebsiteClick(){
        websiteClickAction.postValue(Unit)
    }
}